The present invention relates to a coding apparatus and method applicable to, for example, a case of coding input picture data by dividing one sequence of moving pictures into groups each of which is composed of a plurality of frames.
As one of the techniques adopted for coding picture data with compression, there is known the MPEG (Moving Picture Experts Group) system. According to this MPEG system, one sequence of moving pictures is coded through division into GOPs (Groups Of Pictures) each composed of a plurality of frames. Each GOP consists of at least one intra-frame coded picture (I-picture) inserted in the GOP, an inter-frame coded picture (P-picture) predicted from a temporally preceding frame already coded, and an inter-frame coded picture (B-picture) predicted from two temporally preceding and following frames.
Normally in the MPEG, the number of frames constituting one GOP is not prescribed in particular. However, generally in the television standard of 525/60 (scanning lines/field frequency, 525 lines/60 Hz, NTSC) system, the number N of frames constituting one GOP is set to 15, and the appearance period M of an I-picture or a P-picture is set to 3. More specifically, two B-pictures are inserted between an I-picture and a P-picture, and a total of 15 pictures are grouped to form a GOP. Consequently, random access to picture data is rendered possible since the picture data including an I-picture are thus processed in a unit of a GOP. Meanwhile in the other television standard of 625/50 (scanning lines/field frequency, 625 lines/50 Hz, PAL or SECAM) system, the number of frames constituting one GOP is set to 12.
In case the input picture data before being coded with picture compression are formed in a unit of seconds, convenience is attainable if the data coded with picture compression can be managed in a unit of seconds as well. For example, in a commercial film where one sequence of moving pictures is divided in a unit of seconds such as 15 or 30 seconds, the compression-coded picture data also need to be temporally managed in a unit of seconds. In the 525/60 system for example where picture data are transmitted at a rate of 30 frames per second, pictures corresponding to one second can be formed exactly in two GOPs each composed of 15 frames, as illustrated in FIG. 1. Consequently it becomes possible to perform picture editing or random access with facility by processing the picture data in a unit of GOPs.
Meanwhile in the 625/50 system, 25 frames are required to form pictures of one second, since picture data are transmitted at a rate of 25 frames per second. However, as illustrated in FIG. 2, merely 24 frames are obtained in two GOPs, so that it is impossible to form required pictures corresponding exactly to one second in a unit of GOPs. In such a case, it has been customary heretofore to adopt a technique of constituting each GOP by 12 frames and balancing the figures temporally in the last GOP where the number of frames is less than 12. In adopting this technique, however, there exists a problem that considerable differences are prone to occur in the quantities of generated data among GOPs.
Adequate measures for solving the above problems may be achieved by setting the frame number per GOP to, e.g., 25 in the 625/50 system. But if the frame number per GOP is excessively increased, it causes another problem that the unit of random access is rendered immoderately larger. Furthermore, taking into account the quantity of generated data in a unit of GOPs, there arises a problem that the result attained is quite different from the 525/60 system.